#define _CRT_SECURE_NO_WARNINGS 1
#include<vector>
#include<iostream>
#include<map>
using namespace std;
class Solution
{
public:
    vector<int> singleNumber(vector<int>& nums)
    {
        map<int, int> rem;
        vector<int> ans;
        for (auto& e : nums)
        {
            rem[e]++;
        }
        for (auto& s : rem)
        {
            if (s.second == 1)
            {
                ans.push_back(s.first);
            }
        }
        return ans;
    }
};